import axios from 'axios'

const baseURL = 'http://81.69.235.62:3000'

const request = axios.create({
    baseURL: baseURL,
    timeout: 6000
})

//请求前
request.interceptors.request.use((res) => {
    //获取token
    const userToken = localStorage.getItem('userToken')
    res.headers.token = userToken
    return res
})

export default request